<!DOCTYPE html>
<html>
<head>
	<title></title>
	<style type="text/css">
		.box {
		  position: relative;
		
		}
	  	.inputTest {
	    	border: 1px solid #ccc;
	  	}
	  	.inputTest:focus + .labelTest {
	    	transform: translateY(-22px);
	  	}
	  	.labelTest {
		    position: absolute;
		    left: 20px;
		    transition: all .2s linear;
	  	}
	</style>
</head>
<body>
	<view class="box">
        <input class="inputTest" type="text" placeholder="">
        <label class="labelTest">测试</label>
  	</view>
</body>
</html>